emacsclient -t should not suspend Emacs server
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 11 Jan 2013 02:40:58 +0000 (18:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 11 Jan 2013 02:40:58 +0000 (18:40 -0800)
commit70273e1420bc1f1ad7cf28ee06cb968b73eca6a1
treedbbb16849ea9baa5d1c4a0187cc3bb361164f811
parent65122456c2222a004ba1053139e4788d7524faf0
emacsclient -t should not suspend Emacs server

* lisp.h, sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
New functions.
* term.c (init_tty): Use them instead of rolling our own code.
* sysdep.c (tcsetpgrp_without_stopping): Likewise.  Here, this
switches from 'signal' to 'pthread_sigmask', which is safer in
multithreaded applications.
* term.c (Fresume_tty): Don't bother dissociating if O_IGNORE_CTTY,
which has already arranged for that.
(dissociate_if_controlling_tty): If setsid fails, fall back on TIOCNOTTY.
This is the main part of the bug fix.
src/ChangeLog
src/lisp.h
src/sysdep.c
src/term.c